package main

import (
	"fmt"
	_ "os"
	"io/ioutil"
	_ "bufio"
)

func main() {

	// 将f1.txt内容导入到f2.txt	
	// 1. 首先将 f1.txt的内容读取到内存
	file1Path := "f1.txt"
	file2Path := "f2.txt"

	data, err := ioutil.ReadFile(file1Path)
	if err != nil {
		fmt.Println("err:", err)
		return
	}

	// 2. 将读取到的内容写入f2.txt
	err = ioutil.WriteFile(file2Path, data, 0666)
	if err != nil {
		fmt.Println("err:", err)
	}




}